import { BaseWindow } from "../../../../component/window/BaseWindow";
import { ILayer } from "../../../../mvc/interfaces/ILayer";
import { Language } from "../../../../../extend/language/Language";
import { DataProvider } from "../../../../../fl/data/DataProvider";
import { ObjCreate } from "../../common/ObjCreate";
import { ScrollPolicy } from "../../../../../fl/controls/ScrollPolicy";
import { CrossDefenceRewardItemRender } from "./item/CrossDefenceRewardItemRender";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
import { GTileList } from "../../../../../com/mui/controls/GTileList";
import { GButton } from "../../../../../com/mui/controls/GButton";
type int = number;
//class CrossDefenceCopyRewardWin
    
    export  class CrossDefenceCopyRewardWin extends BaseWindow
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            this.setSize(275, 205);
            this.title = Language.getString(20938);
            this.titleHeight = 27;
            return;
        }

        public updateView(arg1: DataProvider, arg2: int=0): void
        {
            this._list.dataProvider = arg1;
            this._list.drawNow();
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            this._txtDesc = ObjCreate.createGTextField("", 20, 40, 240, 40, this);
            this._txtDesc.multiline = true;
            this._txtDesc.wordWrap = true;
            var loc1=this._txtDesc.defaultTextFormat;
            loc1.leading = 4;
            loc1.size = 14;
            this._txtDesc.defaultTextFormat = loc1;
            this._txtDesc.text = Language.getString(80316);
            this._list = ObjCreate.createTileList(35, 80, 210, 86, this);
            this._list.scrollPolicy = ScrollPolicy.OFF;
            this._list.columnWidth = 41;
            this._list.rowHeight = 41;
            this._list.setStyle("cellRenderer", CrossDefenceRewardItemRender);
            this._btnOK = ObjCreate.createGButton(Language.getString(69901), 122, 170, 45, 23, this);
            this._btnOK.addEventListener(flash.events.MouseEvent.CLICK, this.clickMeHandler);
            return;
        }

        /* internal  */clickMeHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            hide();
            return;
        }

        /* internal */ /* var */_txtDesc: GTextFiled;

        /* internal */ /* var */_list: GTileList;

        /* internal */ /* var */_btnOK: GButton;
    }
